package abf;

public class Consumer {
    public static void main(String[] args) {
        //创建小米工厂
        XiaoMiFactory xiaoMiFactory = new XiaoMiFactory();
        //小米工厂生产手机
        IPhoneProduct iPhoneProduct = xiaoMiFactory.iphoneProduct();
        iPhoneProduct.call();
        iPhoneProduct.sendSMS();
        //小米工厂生产路由器
        IRouterProduct iRouterProduct = xiaoMiFactory.irouterProduct();
        iRouterProduct.open();
        iRouterProduct.wifi();
        iRouterProduct.close();
        //创建华为工厂
        HuaWeiFactory huaWeiFactory = new HuaWeiFactory();
        //华为工厂生产手机
        IPhoneProduct iPhoneProduct1 = huaWeiFactory.iphoneProduct();
        iPhoneProduct1.sendSMS();
        iPhoneProduct1.call();
        //华为工厂生产路由器
        IRouterProduct iRouterProduct1 = huaWeiFactory.irouterProduct();
        iRouterProduct1.open();
        iRouterProduct1.wifi();
        iRouterProduct1.close();

    }
}
